package com.xbongbong.parent.pojo.list;

import com.alibaba.fastjson.JSONObject;
import com.xbongbong.paas.domain.entity.ext.ConditionsEntityExt;
import com.xbongbong.paas.toolbox.wrap.QueryIgnore;
import com.xbongbong.paas.toolbox.wrap.UserVO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 列表拼装条件所需参数
 * @author 吴峰
 * @date 2021/12/15 17:31
 */
@Getter
@Setter
@ToString
public class ConditionListPojo implements Serializable {
    private static final long serialVersionUID = 3859230483918379722L;
    /**
     * 公司ID
     */
    private String corpid ;

    private Long formId ;

    private Integer businessType;

    private Long listGroupId;

    private Integer defaultGroup;

    private List<ConditionsEntityExt> conditionList;

    private List<List<ConditionsEntityExt>> shouldConditionList;

    private UserVO userVO;

    /**
     * @see com.xbongbong.paas.enums.PlatFormEnum
     */
    private String platform;

    private Integer subBusinessType;
    /**
     * saas列表数据状态
     */
    private Integer statusFilter;

    /**
     * 特殊列表筛选
     */
    private JSONObject commonFilter;

    /**
     * 自定义、系统标志
     * @see com.xbongbong.pro.statistic.enums.StatisticsTypeEnum
     */
    private Integer statisticsType;

    public ConditionListPojo() {
        conditionList = new ArrayList<>();
    }

    public ConditionListPojo(Integer subBusinessType, String corpid, UserVO userVO, Integer statusFilter, Integer statisticsType) {
        this.subBusinessType = subBusinessType;
        this.corpid = corpid;
        this.userVO = userVO;
        this.statusFilter = statusFilter;
        this.statisticsType = statisticsType;
    }


    public ConditionListPojo(String corpid, Long formId, Integer businessType, Long listGroupId, Integer defaultGroup, List<ConditionsEntityExt> conditionList, List<List<ConditionsEntityExt>> shouldConditionList, UserVO userVO, String platform, Integer subBusinessType, Integer statusFilter, JSONObject commonFilter, Integer statisticsType) {
        this.corpid = corpid;
        this.formId = formId;
        this.businessType = businessType;
        this.listGroupId = listGroupId;
        this.defaultGroup = defaultGroup;
        this.conditionList = conditionList;
        this.shouldConditionList = shouldConditionList;
        this.userVO = userVO;
        this.platform = platform;
        this.subBusinessType = subBusinessType;
        this.statusFilter = statusFilter;
        this.commonFilter = commonFilter;
        this.statisticsType = statisticsType;
    }
}
